<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Test: Menu Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Test
   &#160;<span id="projectnumber">1.0.0.0</span>
   </div>
   <div id="projectbrief">A test</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('class_menu.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">Menu Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Menu" --><!-- doxytag: inherits="Window" -->
<p><code>#include &lt;<a class="el" href="_menu_8h_source.html">Menu.h</a>&gt;</code></p>

<p>Inherits <a class="el" href="class_window.html">Window</a>.</p>

<p><a href="class_menu-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a7fae28e8b4ffb1da9ccf44aac24de4e0">Menu</a> (int <a class="el" href="class_window.html#aa3be8f50b45a4f7b48ae66ae54885672">x</a>, int <a class="el" href="class_window.html#a1da567c448323caf7873fe4f1d4cf4d6">y</a>, vector&lt; <a class="el" href="class_menu_item.html">MenuItem</a> &gt; items, <a class="el" href="class_scene.html">Scene</a> *handler, <a class="el" href="_menu_8h.html#af4f8539d62b9d82947cd78d1cd7570e4">SelectFunction</a> selectFunction, int numColumns=1, bool canExit=true)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a831387f51358cfb88cd018e1777bc980">~Menu</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a88a60222cada559f0e2a897404b6eddf">getSelectedIndex</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a19eec6215d2e6a854c96a338c238e696">setSelectedIndex</a> (int newIndex)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a174cfacd7767304830d7b7a9232f4df5">setItemEnabled</a> (int index, bool newEnabled)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#add49fdd2d51a0b8ea24c7b636ca3a9d6">handleEvent</a> (SDL_Event *event)</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_menu.html">Menu</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a3993fe017f1aae678aebaacf76a8b41f">getTopMenu</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a79fe642511b8509d81d52e3243b65a01">pushMenuStack</a> (<a class="el" href="class_menu.html">Menu</a> *menu)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#ab8c493c0624601635166bbe264345c7d">popMenuStack</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a7401a39cefb6021d588e882231913f14">clearMenuStack</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#ad4ddf45260f64f1f40cd8277d54c3405">drawMenuStack</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a1de26a0176213eaf0df5afbc6096d7e9">ITEM_WIDTH</a> = <a class="el" href="class_window.html#acd23d331a69698c7a9b1d066aa05e1ea">Window::GRID_SIZE</a> * 16</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_menu.html#a87caab259b7ca18bb92cc05838299752">ITEM_HEIGHT</a> = <a class="el" href="class_window.html#acd23d331a69698c7a9b1d066aa05e1ea">Window::GRID_SIZE</a> * 3</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Summary: A selectable window </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a7fae28e8b4ffb1da9ccf44aac24de4e0"></a><!-- doxytag: member="Menu::Menu" ref="a7fae28e8b4ffb1da9ccf44aac24de4e0" args="(int x, int y, vector&lt; MenuItem &gt; items, Scene *handler, SelectFunction selectFunction, int numColumns=1, bool canExit=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Menu::Menu </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; <a class="el" href="class_menu_item.html">MenuItem</a> &gt;&#160;</td>
          <td class="paramname"><em>items</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_scene.html">Scene</a> *&#160;</td>
          <td class="paramname"><em>handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="_menu_8h.html#af4f8539d62b9d82947cd78d1cd7570e4">SelectFunction</a>&#160;</td>
          <td class="paramname"><em>selectFunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numColumns</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>canExit</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Constructs a <a class="el" href="class_menu.html">Menu</a></p>
<p>Arguments: x: The x coordinate of the top-left corner of the window y: The y coordinate of the top-left corner of the window items: The items available in the menu handler: The scene that will execute the callback function selectFunction: The function to execute when an item is selected numColumns: The number of columns to place the items in canExit: Determines whether or not this menu can be exited </p>

</div>
</div>
<a class="anchor" id="a831387f51358cfb88cd018e1777bc980"></a><!-- doxytag: member="Menu::~Menu" ref="a831387f51358cfb88cd018e1777bc980" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Menu::~Menu </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Destroys a <a class="el" href="class_menu.html">Menu</a> </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7401a39cefb6021d588e882231913f14"></a><!-- doxytag: member="Menu::clearMenuStack" ref="a7401a39cefb6021d588e882231913f14" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Menu::clearMenuStack </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Clears the <a class="el" href="class_menu.html">Menu</a> Stack and deletes all Menus in it </p>

</div>
</div>
<a class="anchor" id="ad4ddf45260f64f1f40cd8277d54c3405"></a><!-- doxytag: member="Menu::drawMenuStack" ref="ad4ddf45260f64f1f40cd8277d54c3405" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Menu::drawMenuStack </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Draws all Menus in the <a class="el" href="class_menu.html">Menu</a> Stack </p>

</div>
</div>
<a class="anchor" id="a88a60222cada559f0e2a897404b6eddf"></a><!-- doxytag: member="Menu::getSelectedIndex" ref="a88a60222cada559f0e2a897404b6eddf" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Menu::getSelectedIndex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Returns the index of the currently selected item</p>
<p>Return: The index of the currently selected item </p>

</div>
</div>
<a class="anchor" id="a3993fe017f1aae678aebaacf76a8b41f"></a><!-- doxytag: member="Menu::getTopMenu" ref="a3993fe017f1aae678aebaacf76a8b41f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_menu.html">Menu</a> * Menu::getTopMenu </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Returns the <a class="el" href="class_menu.html">Menu</a> at the top of the <a class="el" href="class_menu.html">Menu</a> Stack</p>
<p>Return: The <a class="el" href="class_menu.html">Menu</a> at the top of the <a class="el" href="class_menu.html">Menu</a> Stack </p>

</div>
</div>
<a class="anchor" id="add49fdd2d51a0b8ea24c7b636ca3a9d6"></a><!-- doxytag: member="Menu::handleEvent" ref="add49fdd2d51a0b8ea24c7b636ca3a9d6" args="(SDL_Event *event)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Menu::handleEvent </td>
          <td>(</td>
          <td class="paramtype">SDL_Event *&#160;</td>
          <td class="paramname"><em>event</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Handles an event</p>
<p>Arguments: event: The event to handle </p>

<p>Implements <a class="el" href="class_window.html#a5f5090dfbbe21010986dec49e446570c">Window</a>.</p>

</div>
</div>
<a class="anchor" id="ab8c493c0624601635166bbe264345c7d"></a><!-- doxytag: member="Menu::popMenuStack" ref="ab8c493c0624601635166bbe264345c7d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Menu::popMenuStack </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Removes the top level <a class="el" href="class_menu.html">Menu</a> and deletes it </p>

</div>
</div>
<a class="anchor" id="a79fe642511b8509d81d52e3243b65a01"></a><!-- doxytag: member="Menu::pushMenuStack" ref="a79fe642511b8509d81d52e3243b65a01" args="(Menu *menu)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Menu::pushMenuStack </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_menu.html">Menu</a> *&#160;</td>
          <td class="paramname"><em>menu</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Pushes a menu onto the <a class="el" href="class_menu.html">Menu</a> Stack </p>

</div>
</div>
<a class="anchor" id="a174cfacd7767304830d7b7a9232f4df5"></a><!-- doxytag: member="Menu::setItemEnabled" ref="a174cfacd7767304830d7b7a9232f4df5" args="(int index, bool newEnabled)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Menu::setItemEnabled </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>newEnabled</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Enables or disables the item at the given index</p>
<p>Arguments: index: The index of the item to enable or disable newEnabled: The new enablization status of the item </p>

</div>
</div>
<a class="anchor" id="a19eec6215d2e6a854c96a338c238e696"></a><!-- doxytag: member="Menu::setSelectedIndex" ref="a19eec6215d2e6a854c96a338c238e696" args="(int newIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Menu::setSelectedIndex </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newIndex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: Sets the selected index</p>
<p>Arguments: newIndex: The index of the new item to select </p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a87caab259b7ca18bb92cc05838299752"></a><!-- doxytag: member="Menu::ITEM_HEIGHT" ref="a87caab259b7ca18bb92cc05838299752" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int <a class="el" href="class_menu.html#a87caab259b7ca18bb92cc05838299752">Menu::ITEM_HEIGHT</a> = <a class="el" href="class_window.html#acd23d331a69698c7a9b1d066aa05e1ea">Window::GRID_SIZE</a> * 3<code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: The height of each menu item </p>

</div>
</div>
<a class="anchor" id="a1de26a0176213eaf0df5afbc6096d7e9"></a><!-- doxytag: member="Menu::ITEM_WIDTH" ref="a1de26a0176213eaf0df5afbc6096d7e9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const int <a class="el" href="class_menu.html#a1de26a0176213eaf0df5afbc6096d7e9">Menu::ITEM_WIDTH</a> = <a class="el" href="class_window.html#acd23d331a69698c7a9b1d066aa05e1ea">Window::GRID_SIZE</a> * 16<code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Summary: The width of each menu item </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>Source/<a class="el" href="_menu_8h_source.html">Menu.h</a></li>
<li>Source/<a class="el" href="_menu_8cpp.html">Menu.cpp</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="class_menu.html">Menu</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Wed Aug 17 2011 21:37:25 for Test by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5 </li>
   </ul>
 </div>


</body>
</html>
